Integrand size = 21, antiderivative size = 60 \[ \int \frac {\csc (e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{a \sqrt {a-b} f}-\frac {\text {arctanh}(\cos (e+f x))}{a f} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3745, 400, 213, 211} \[ \int \frac {\csc (e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{a f \sqrt {a-b}}-\frac {\text {arctanh}(\cos (e+f x))}{a f} \]
[In]
[Out]
Rule 211
Rule 213
Rule 400
Rule 3745
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (e+f x)\right )}{a f}-\frac {b \text {Subst}\left (\int \frac {1}{a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{a f} \\ & = -\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{a \sqrt {a-b} f}-\frac {\text {arctanh}(\cos (e+f x))}{a f} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(144\) vs. \(2(60)=120\).
Time = 0.59 (sec) , antiderivative size = 144, normalized size of antiderivative = 2.40 \[ \int \frac {\csc (e+f x)}{a+b \tan ^2(e+f x)} \, dx=\frac {\sqrt {a-b} \sqrt {b} \arctan \left (\frac {\sqrt {a-b}-\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )+\sqrt {a-b} \sqrt {b} \arctan \left (\frac {\sqrt {a-b}+\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )-(a-b) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )\right )}{a (a-b) f} \]
[In]
[Out]
Time = 0.18 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.17
method | result | size |
derivativedivides | \(\frac {\frac {b \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {b \left (a -b \right )}}\right )}{a \sqrt {b \left (a -b \right )}}-\frac {\ln \left (\cos \left (f x +e \right )+1\right )}{2 a}+\frac {\ln \left (\cos \left (f x +e \right )-1\right )}{2 a}}{f}\) | \(70\) |
default | \(\frac {\frac {b \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {b \left (a -b \right )}}\right )}{a \sqrt {b \left (a -b \right )}}-\frac {\ln \left (\cos \left (f x +e \right )+1\right )}{2 a}+\frac {\ln \left (\cos \left (f x +e \right )-1\right )}{2 a}}{f}\) | \(70\) |
risch | \(\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{a f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{a f}+\frac {i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right )}{2 \left (a -b \right ) f a}-\frac {i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right )}{2 \left (a -b \right ) f a}\) | \(171\) |
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 184, normalized size of antiderivative = 3.07 \[ \int \frac {\csc (e+f x)}{a+b \tan ^2(e+f x)} \, dx=\left [\frac {\sqrt {-\frac {b}{a - b}} \log \left (\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (a - b\right )} \sqrt {-\frac {b}{a - b}} \cos \left (f x + e\right ) - b}{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}\right ) - \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{2 \, a f}, -\frac {2 \, \sqrt {\frac {b}{a - b}} \arctan \left (-\frac {{\left (a - b\right )} \sqrt {\frac {b}{a - b}} \cos \left (f x + e\right )}{b}\right ) + \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) - \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{2 \, a f}\right ] \]
[In]
[Out]
\[ \int \frac {\csc (e+f x)}{a+b \tan ^2(e+f x)} \, dx=\int \frac {\csc {\left (e + f x \right )}}{a + b \tan ^{2}{\left (e + f x \right )}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\csc (e+f x)}{a+b \tan ^2(e+f x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 108 vs. \(2 (52) = 104\).
Time = 0.46 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.80 \[ \int \frac {\csc (e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {\frac {2 \, b \arctan \left (-\frac {a \cos \left (f x + e\right ) - b \cos \left (f x + e\right ) - b}{\sqrt {a b - b^{2}} \cos \left (f x + e\right ) + \sqrt {a b - b^{2}}}\right )}{\sqrt {a b - b^{2}} a} - \frac {\log \left (\frac {{\left | -\cos \left (f x + e\right ) + 1 \right |}}{{\left | \cos \left (f x + e\right ) + 1 \right |}}\right )}{a}}{2 \, f} \]
[In]
[Out]
Time = 11.05 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.52 \[ \int \frac {\csc (e+f x)}{a+b \tan ^2(e+f x)} \, dx=\frac {\ln \left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{a\,f}-\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {b-a\,\cos \left (e+f\,x\right )+b\,\cos \left (e+f\,x\right )}{2\,\sqrt {b}\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\sqrt {a-b}}\right )}{a\,f\,\sqrt {a-b}} \]
[In]
[Out]